/*************************************************************************
        > File Name: main.c
        > Author: tcy
        > Mail: 2652028905@qq.com
        > Created Time: Thu 23 May 2024 11:16:30 AM +08
 ************************************************************************/

#include "processBar.h"
#include <unistd.h>
typedef void (*callback_t)(int);

void DownLoad(callback_t cb){
 int total =1000;
 int curr=0;
 while(curr<=total){
    usleep(50000);
    int rate = curr*100/total;
    cb(rate);
    curr+=10;
 }
 printf("\n");
}
int main(){
    DownLoad(processBar);
    initbar();
    return 0;
    
}
